MPSignalSemaphore

Signals a semaphore.

OSStatus MPSignalSemaphore (MPSemaphoreID semaphore);
semaphore
A value of type MPSemaphoreID that specifies the ID of the semaphore you want to signal.

function result
A result code. See Result Codes for a list of possible values. If the value of the semaphore was already at the maximum, MPSignalSemaphore returns kInsufficientResourcesErr .
DISCUSSION
If tasks are waiting on the semaphore, the oldest (first queued) task is unblocked so that the corresponding MPWaitOnSemaphore call for that task completes. Otherwise, if the value of the semaphore is not already equal to its maximum value, it is incremented by one.

Note that you can call this function from an interrupt handler.

VERSION NOTES
Introduced with Multiprocessing Services 1.0.

SEE ALSO
The function MPWaitOnSemaphore .


© 1999 Apple Computer, Inc. – (Last Updated 17 Nov 99)